package com.zhp.fs.pojo;

/**
 * 说明：
 * <p>
 * 作者： fwj
 * <p>
 * 时间： 2017/7/29  9:51
 */
public class ResultMap {
    //0 成功，1失败
    private int code;

    //返回数据信息
    private String data;

    public ResultMap(int code, String data) {
        this.code = code;
        this.data = data;
    }

    public ResultMap() {
    }

    public ResultMap setSuccessCode() {
        return setCode(0);
    }

    public int getCode() {
        return code;
    }

    public ResultMap setCode(int code) {
        this.code = code;
        return this;
    }

    public String getData() {
        return data;
    }

    public ResultMap setData(String data) {
        this.data = data;
        return this;
    }


    public Object setFailCode() {
        return setCode(1);
    }

}
